package com.xiaomaoguai.websocket.common.model;


/**
 * 统一返回实体对象
 *
 * @ FileName: ResponseModel.java
 * @ Author: WeiHui-Z
 * @ Date: 2017/4/17 20:33
 * @ Version: v1.0.0
 */
public class ResponseModel {

    /**
     * 返回码
     */
    private Integer code;
    /**
     * 是否成功
     */
    private boolean success;
    /**
     * 返回信息
     */
    private String msg;
    /**
     * 返回结果集 用户自定义对象
     */
    private Object result;

    public ResponseModel() {
    }

    public ResponseModel(boolean success) {
        this.success = success;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return "ResponseModel [code=" + code + ", success=" + success
                + ", msg=" + msg + ", result=" + result + "]";
    }

}